package thomas.javase.time;

import org.junit.Test;

import java.util.concurrent.TimeUnit;

public class TimeTest {

    @Test
    public void testTimeCost(){
        long start = System.nanoTime();
        for(int i=0;i<100000000;i++) {
            long a = i*2312/234*12;
        }
        long end = System.nanoTime();
        long used = end-start;
        System.out.println("used:"+ TimeUnit.NANOSECONDS.toMillis(used)+" ms");
    }
}
